import request from '@/utils/request';

export async function fetchImgcode() {
  return await request.post('/api/1.0/common/code/80/38', {
    pageCurrent: '1',
    token:localStorage.getItem('token')
  });
}

export async function fetchHomeToken() {
  return await request.post('/home', {
    jobId: new Date(),
    hdp: 'company'
  });
}

export async function fetchToken(email, password, verifykey, hdp) {
  return await request.post('/api/1.0/manager/user/login', {
    account: email,
    passWord: password,
    securityCode: verifykey,
    hdp: hdp,
    token:localStorage.getItem('token')
  });
}

export async function isKey(code) {
  return await request.post('/code/check', {
    securityCode: code
  });
}

export async function getUserInfo() {
  return await request.post('/api/1.0/manager/user/info', {});
}
